package krug;

public class Hexenhut extends Krug{
  public Hexenhut(double vol, double inh){
    super(vol, inh);
  }

  public Hexenhut(double vol){
    this(vol, 0);
  }

  public void schuetteIn(Krug ziel){
    super.schuetteIn(ziel);
    if(inhalt==0) volumen-=1;
    if(volumen<0) volumen=0;
  }
  
  public String toString(){
    return "Hexenhut V="+volumen+" I="+inhalt;
  }
}
